Skip to content

fix(rootly): map the in_triage incident status to TODO - #9404

Open
ShivamSharma43 wants to merge 1 commit into
apache:mainfrom
ShivamSharma43:fix/rootly-in-triage-status
Open

ShivamSharma43 wants to merge 1 commit into
apache:mainfrom
ShivamSharma43:fix/rootly-in-triage-status

Conversation

@ShivamSharma43

Copy link
Copy Markdown
Contributor

Summary

The Rootly convertIncidents subtask maps the status triage to TODO, but Rootly never returns triage. Its API calls that status in_triage.

The incident status enum in Rootly's OpenAPI spec (https://rootly-heroku.s3.amazonaws.com/swagger/v1/swagger.json) is in_triage, started, detected, acknowledged, mitigated, resolved, closed, cancelled, scheduled, in_progress, completed. There is no triage. So mapStatus has no case for real in-triage incidents. They fall through to the default branch: issues.status becomes IN_PROGRESS instead of TODO, and the converter logs unknown rootly incident status: in_triage once for every such incident.

Changes:

  • tasks/incidents_converter.go: mapStatus matches in_triage instead of triage.
  • tasks/incidents_converter_test.go: the TestMapStatus case uses in_triage. With the old code it fails (expected: "TODO", actual: "IN_PROGRESS").
  • e2e/raw_tables/_raw_rootly_incidents.csv and the _tool_rootly_incidents.csv / issues.csv snapshots: incident inc_01 now has the real status value in_triage instead of triage. Its domain status stays TODO. Only that one value changes.

No migration: rows are rewritten on the next conversion.

Does this close any open issues?

No issue is open for this. The bug is described above.

Screenshots

N/A

Other Information

  • go test ./plugins/rootly/tasks/: pass. The e2e test needs E2E_DB_URL, which I didn't run locally. The fixture change only swaps the status string in the raw row and the two snapshots that copy it.
  • go vet ./plugins/rootly/... and gofmt: clean.
  • No open PR touches the rootly plugin.
  • Rootly also has detected, acknowledged, scheduled and in_progress, which still fall back to IN_PROGRESS with a warning. I left them out to keep this PR small. I can map them in a follow-up if you want.
  • Suggested label: pr-type/bug-fix.
  • AI assistance disclosure: I prepared this change with Claude Code (Claude Opus 5.5), reviewed the diff and ran the tests. The commit has a Generated-by: trailer, following the ASF generative tooling guidance.

🤖 Generated with Claude Code

mapStatus matched "triage", but Rootly's incident status is
"in_triage" ("triage" is not in its API's status enum). In-triage
incidents fell through to the default branch, became IN_PROGRESS and
logged an unknown status warning.

Match "in_triage", and use the real value in the unit test and the
e2e fixtures.

Generated-by: Claude Code (Claude Opus 5.5)

Signed-off-by: Shivam Sharma <192242476+ShivamSharma43@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 05:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants